﻿using Max.PH4.Shoppgin.Admin.Domain;
using Max.PH4.Shoppgin.Admin.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4.Shoppgin.Admin.IService
{
    /*
     * 系统用户的服务接口
     * **/

    /// <summary>
    /// 系统用户的服务接口
    /// </summary>
    public interface ISystemUserService
    {
        /// <summary>
        /// 后台管理用户登录
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        (bool, string, SystemUserLoginOutputDto) Login(string userName,string password);

        (bool, string) Insert(SystemUserEntity entity);
        int Update(SystemUserEntity entity);
        int Delete(SystemUserEntity entity);
        int Delete(object id);
        List<SystemUserOutputDto> Query();
        IQueryable<SystemUserOutputDto> Query(string name);

        /*
         * out表示输出（在这个方法结束前，一定要给out参数即total赋值，调用这个方法的时候，不用传值）
         * **/
        IQueryable<SystemUserOutputDto> Query(string name,int pageIndex,int pageSize,out int total);
    }
}
